package com.contentteam.util.config.metadata;

import java.lang.reflect.Method;

/**
 * Exception to mark problems with Getters inside PropertyBasedObjectFactory/GuiceModule.
 * 
 * @author Andreas Siebert, contentteam AG (asiebert@contentteam.com)
 */
public class CorruptGetterException extends RuntimeException {

	private Method method;

	public CorruptGetterException(final Method getter, String logMsg) {
		super(logMsg + "\n\n" + "[GETTER: "
				+ MethodUtils.printMethodHeader(getter) + "]");

		this.method = getter;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Method getGetterName() {
		return method;
	}
}
